Multiprocessor systems are well understood computing platforms wherein processes are run simultaneously or concurrently on two or more central processing units (CPU). The most widely used multiprocessor systems employ a shared memory and a shared bus. In such systems, each CPU has an assigned portion of memory and the operating system manages the logical separation of memory among the multiple CPUs. The operating system typically manages access to the shared memory and uses a process of caching to reduce memory contention.
Some multiprocessor systems assign an application to a single CPU. Other, more sophisticated systems, allow a single application to be assigned to more than one CPU. In that instance, a given process of an application could run on any one of the assigned CPUs. So for example, multiple processes affiliated with one application could simultaneously execute on two or more CPUs. For example, if a system had eight CPUs, a given application may be assigned to run on a subset of four particular ones of the eight processors, and not the other four CPUs. Presumably, the other four CPUs would be busy executing other applications.
The assignment of applications to CPUs is generally referred to as CPU affinity. Ideally, CPU affinity is selected in such a way to maximize system performance and to minimize movement of data from one CPU cache to another CPU cache. The set of CPUs that are assigned to execute an application are collectively referred to as an affinity mask. Additionally, more efficiency is gained by recognizing that what is generally thought of as an application is in practice a set of threads or sets of instructions that carry out a specific task. Oftentimes, threads can run independently of other threads. Hence, allowing multiple threads or processes from a single application to execute over a number of CPUs may dramatically increase application performance.
The ability to monitor the load balance across the multiple CPUs is critical to maximizing the overall system performance. For example, it would be undesirable to have one CPU or set of CPUs operating at near capacity while other CPUs sit idle. Similarly, it may be undesirable to have too many CPUs assigned to execute particular applications because too much overhead is generated by spreading the application over too many processes, particularly if the application is making insignificant utilization of one or more of the CPUs to which it is assigned. Therefore, there is a need to be able to gauge system performance at an application and CPU level in a multiprocessor system and to dynamically adjust CPU utilization. Existing systems require that a user (typically a system administrator) have an intricate understanding of the operation of the multiprocessor system in order to create affinity masks that are at all efficient, let alone optimal for a particular configuration.